const path = require('path');
function resolve(dir) {
  return path.join(__dirname, dir);
}
module.exports = {
  css: {
    loaderOptions: {
      stylus: {
        'resolve url': true,
        import: ['./src/theme'],
      },
    },
  },
  pluginOptions: {
    'cube-ui': {
      postCompile: true,
      theme: true,
    },
  },
  chainWebpack(config) {
    config.resolve.alias
      .set('commpontent', resolve('src/components'))
      .set('common', resolve('src/common'))
      .set('api', resolve('src/api'));
  },
  devServer: {
    // 项目运行时候的端口号
    port: 9988,
  },
};
